package cn.liulin.java8.collector;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

/**
 * cn.liulin.java8.collector$
 *
 * @author ll
 * @date 2021-10-15 18:07:22
 **/
public class CollectorUse {
    public static void main(String[] args) {
        Stream<Integer> stream = Arrays.asList(1, 2, 3, 4).stream();
        List<Integer> collect = stream.collect(new ToListCollector<Integer>());
        System.out.println(collect);
    }
}
